package com.xmtlxx.oms.mapper;

import com.xmtlxx.oms.domain.OperatorLog;
import com.xmtlxx.oms.domain.bo.OperatorLogBo;
import com.xmtlxx.oms.domain.vo.OperatorLogVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 操作日志Mapper接口
 *
 * @author xmtlxx
 * @date 2022-10-18
 */
public interface OperatorLogMapper extends BaseMapperPlus<OperatorLogMapper, OperatorLog, OperatorLogVo> {
    /**
     * 根据条件分页查询操作日志
     *
     * @param operatorLog 操作日志
     * @return Page OperatorLog
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "o.create_by"),
//        @DataColumn(key = "deptName", value = "o.dept_id"),
//        @DataColumn(key = "userName", value = "o.create_by")
//    })
    Page<OperatorLogVo> selectPageOperatorLogList(@Param("page") Page<OperatorLog> page, @Param("operatorLog") OperatorLogBo operatorLog);

    /**
     * 查询操作日志列表
     *
     * @param operatorLog 操作日志
     * @return 操作日志集合
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "o.create_by"),
//        @DataColumn(key = "deptName", value = "o.dept_id"),
//        @DataColumn(key = "userName", value = "o.create_by")
//    })
    List<OperatorLogVo> selectOperatorLogList(@Param("operatorLog") OperatorLogBo operatorLog);

    OperatorLogVo selectOperatorLogVoByID(String id);

    List<OperatorLog> operatorLogList(@Param("operatorLog") OperatorLogBo operatorLog);

    int updateOperatorLog(@Param("operatorLog") OperatorLog operatorLog);
    int updateOperatorLogBatchById(@Param("list") List<OperatorLog> operatorLogs);
}
